﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DebugTools
{
    class ELoad:Visa
    {
        public string _szType;
        protected string _szPreCmd;
        protected string _szCmd;
        protected string _szRet;

        public double _dVolt;
        public double _dCurr;

        public ELoad(string szInsID):base(szInsID)
        {
            _szPreCmd = "*CLS\n";
            _szType = "";
        }

        public virtual double MeasChannelVolt(string Chan)
        {
            _dVolt = 0.0;
            this.Write(_szPreCmd);

            _szRet = this.Query(_szCmd);

            double.TryParse(_szRet, out _dVolt);
            return _dVolt;
        }

        public virtual double MeasChannelCurr(string Chan)
        {
            _dCurr = 0.0;
            this.Write(_szPreCmd);

            _szRet = this.Query(_szCmd);

            double.TryParse(_szRet, out _dCurr);
            return _dCurr;
        }
    }
}
